const sumAll = arr => {
  let [start, end] = arr;
  if (start > end) [end, start] = arr;
  let sum = 0;
  for (let i = start; i <= end; i++) {
    sum += i;
  }
  return sum;
}